
{***********************************************************}
{                                                           }
{      Informix Data Access Components                      }
{                                                           }
{      IDAC constants                                       }
{                                                           }
{      Copyright (c) 2001-2008 Luxena Software Company      }
{      http://www.luxena.com                                }
{      e-mail: support@luxena.com                           }
{                                                           }
{***********************************************************}

unit IfxConsts;

{$I lx.inc}

interface

uses LXConsts;

const
  IDACVersion                   = {$I IfxVersion.inc};

  MAX_IDENTIFIER_LENGTH         = 128;

  NOT_IN_TRANSACTION            = -255;
  CURSOR_NOT_OPENED             = -259;
  MUST_TERMINATE_TRANSACTION    = -377;
  SERVER_BUSY                   = -439;
  ALREADY_IN_TRANSACTION        = -535;
  INVALID_TRANSACTION_STATE     = -1800;

  DIAGS_NUMBER_FIELD            = 1;
  DIAGS_MORE_FIELD              = 2;
  DIAGS_RETURNED_SQLSTATE_FIELD = 3;
  DIAGS_CLASS_ORIGIN_FIELD      = 4;
  DIAGS_SUBCLASS_ORIGIN_FIELD   = 5;
  DIAGS_MESSAGE_TEXT_FIELD      = 6;
  DIAGS_MESSAGE_LENGTH_FIELD    = 7;
  DIAGS_ROW_COUNT_FIELD         = 8;
  DIAGS_SERVER_NAME_FIELD       = 9;
  DIAGS_CONNECTION_NAME_FIELD   = 10;
  DIAGS_INFORMIX_SQLCODE_FIELD  = 11;

  CURSOR_FLAG_SCROLL            = $0020;
  CURSOR_FLAG_WITH_HOLD         = $1000;

  SCROLL_DIRECTION_NEXT         = 1;
  SCROLL_DIRECTION_PRIOR        = 2;
  SCROLL_DIRECTION_ABSOLUTE     = 6;
  SCROLL_DIRECTION_RELATIVE     = 7;

resourcestring
  SLibraryErrorCaption = 'Informix Connectivity Problem';
  SLibraryErrorMessage =
    'Cannot load the %s Infomix connectivity library. ' + SLineBreak +
    'Please check Informix connectivity installation';
  SLibraryProcMissing =
    'Procedure %s is missing in the %s Informix connectivity library. ' + SLineBreak +
    'Please check Informix connectivity version (2.30 or higher is required)';

  SSQLError = '%d SQL error: %s';
  SISAMMessage = '%d ISAM message: ';

  S280ClientRequired = 'Data type in ''%s'' requires Informix 2.80 ' +
    'or later connectivity software';

  SNotSupported = 'Unsupported feature';

  SErrorMsgFailure = 'Get SQL error message failure, reason %d' + SLineBreak +
    'Please see Informix error message documentation';

  SCancelLogin = 'Operation has been cancelled by the user';

  SConnectionOpened = 'Cannot perform this operation on an opened connection';
  SConnectionClosed = 'Cannot perform this operation on a closed connection';
  SConnectionHandleWrong = 'Active connection handle is wrong';
  SConnectionIdle = 'The server is not currently processing an SQL request';
  SCannotSetIsolationLevel = 'Cannot set an isolation level.' + SLineBreak + '%s';
  SUpdateWrongDatabase = 'Cannot update, %s is not owned by %s';

  SConnectionRequired = 'This operation requires a connection';

  SSQLEmpty = 'There are no statements to run';
  SSQLUnprepared = 'Cannot perform this operation when statement is not prepared';
  SSQLPrepared = 'Cannot perform this operation when statement is prepared';
  SSQLOpened = 'Cannot perform this operation when cursor is opened';
  SSQLClosed = 'Cannot perform this operation when cursor is not opened';

  SHostVariableNotFound = 'Host variable (''%s'') not found';
  SFieldNameIsReadOnly = 'Field name is read-only';
  SUnsupportedFieldType = 'Unsupported data type ''%s''. Field ''%s''';
  SUnsupportedValueType = 'Unsupported value type for ''%s''';

  SInvalidConversion = 'Invalid data conversion ''%s''';
  SInvalidLocator = 'Invalid locator value';
  SInvalidLob = 'Invalid lob value';
  SInvalidStorageParamsHandle = 'Invalid storage params handle';
  SInvalidConstructor = 'Cannot use this constructor';
  SClosedLob = 'This operation requires blob/clob to be opened';
  SOpenedLob = 'This operation requires blob/clob to be closed';
  SConnectionProviderRequired = 'Connection provider is missing';
  SCannotHanldeLob = 'Cannot handle blob/clob in ''%s''. Buffer handler is not initialized';

  SCircularDataLink = 'Circular datalinks are not allowed';
  SCannotRequestLive = 'Cannot open dataset in RequestLive mode';
  SCannotRefreshRecord = 'Cannot refresh the posted record';

  SInvalidFieldDataSet = 'Native field requires TIfxCustomDataSet';
  SInvalidFieldPrecision = 'Invalid field precision %d';
  SInvalidFieldScale = 'Invalid field scale %d';
  SInvalidFieldTimeUnit = 'Invalid field time unit';
  SInvalidFieldTimeUnits = 'First time unit cannot be lower then last';

  SNoTableName = 'Missing TableName property';
  STableMismatch = 'Source and destination tables are incompatible';
  SMasterDetailFieldsMismatch = 'Detail field list doesn''t match to the master';

  SNoProcName = 'Missing StoredProcName property';

  SInformationEventType = 'Information';
  SWarningEventType = 'Warning';
  SErrorEventType = 'Error';

  SNotifyCreateConn = 'Create the connection to ''%s'' (handle ''%s'')';
  SNotifyOpenDatabase = '%s: Open the database ''%s''';
  SNotifyDatabaseChange = '%s: Database has been changed';
  SNotifyNotLoggedDatabase = '%s: Database doesn''t support transactions';
  SNotifyLoggedDatabase = '%s: Database supports transactions';
  SNotifyNotAnsiDatabase = '%s: Database is not ANSI compliant';
  SNotifyAnsiDatabase = '%s: Database is ANSI compliant';
  SNotifyNotInformixSE = '%s: Server is not Informix SE';
  SNotifyInformixSE = '%s: Server is Informix SE';
  SNotifyReleaseConn = '%s: Release the connection into the pool';
  SNotifyCloseConn = '%s: Close the connection';
  SNotifyConnFromPool = 'Take the connection from the pool (handle ''%s'')';
  SNotifySetIsolation = '%s: Set isolation level ''%s''';
  SNotifyBeginTrans = '%s: Begin Transaction';
  SNotifyCommitTrans = '%s: Commit Transaction';
  SNotifyRollbackTrans = '%s: Rollback Transaction';
  SNotifyAutoCommitTrans = '%s: AutoCommit Transaction';
  SNotifyStmtFromCache = '%s: Take the prepared statement from the cache (handle ''%s'')%s%s%s';
  SNotifyExecuteDirect = '%s: Execute direct%s%s';
  SNotifyCreateStmt = '%s: Create the prepared statement (handle ''%s'')%s%s%s';
  SNotifyReleaseStmt = '%s: Release the prepared statement (%d reference(s) remain)';
  SNotifyDeleteStmt = '%s: Delete the prepared statement';
  SNotifyCursorFromCache = '%s: Take the cached cursor (handle ''%s'')';
  SNotifyDeclareCursor = '%s: Declare the cursor (handle ''%s'')';
  SNotifyPrepare = 'Prepare';
  SNotifyExecute = 'Execute';
  SNotifyOpen = 'Open';
  SNotifyFetch = 'Fetch';
  SNotifyClose = 'Close';
  SNotifyIsNull = 'is null';
  SNotifyIsNotNull = 'is not null';
  SNotifyParamCount = 'Parameters (count = %d)';

  SCircularMonitorLink = 'Circular monitor links are not allowed';

  SMissedFileName = 'File name is not specified';
  SCannotCreateFile = 'Cannot create file.' + SLineBreak + '%s';

  STimeStampHeader = 'Time Stamp';
  SThreadIDHeader = 'Thread ID';
  SEventTypeHeader = 'Event Type';
  SMessageHeader = 'Message';

  SVisualCaption = 'Visual Monitor';
  SMenuAutoShow = 'Auto Show';
  SMenuStayOnTop = 'Stay On Top';
  SMenuHelpOnError = 'Help On Error';
  SMenuClear = 'Clear';
  SMenuClose = 'Close';

implementation

end.